#include<bits/stdc++.h>
using namespace std;
const int maxn=2e5+9;
const int INF=1e9;
int n,m,k;
vector<int> G[maxn];
bool p[maxn];
bool vis[maxn];
int tot;
int cnt[maxn];
vector<int> e[maxn];
vector<int> guan;
//give a tree with e.
int t[maxn];
int fa[maxn];
int dep[maxn];
int id[maxn];
vector<vector<int>> ans(maxn);
int res;
void dfs(int u,int f)
{
	if(vis[u]) return;
	guan.push_back(u);
	vis[u]=1;
	cnt[tot]+=p[u];
	for(auto v:G[u]) if(!vis[v]) dfs(v,u),e[u].push_back(v);
}
void print(int u,int v,int lca)
{
	res++;
	ans[res].push_back(dep[v]-dep[lca]+dep[u]-dep[lca]+1);
	while(u!=lca)
	{
		ans[res].push_back(u);
		u=fa[u];
	}
	ans[res].push_back(u);
	vector<int> tmp;tmp.clear();
	while(v!=lca)
	{
		tmp.push_back(v);
		v=fa[v];
	}
	for(int i=tmp.size()-1;i>=0;i--) ans[res].push_back(tmp[i]);
}
void dfs1(int u,int f)
{
	vector<int> g;
	g.clear();
	fa[u]=f;dep[u]=dep[f]+1;
	t[u]=0;
	for(auto v:e[u])
	{
		if(v==f) continue;
		dfs1(v,u);
		if(t[v]) g.push_back(t[v]);
	}
	if(p[u]) g.push_back(u);
	if(g.size()<2)
	{
		if(g.size()==1) t[u]=g[0];
		else t[u]=0;
		return;
	}
	int pp=g.size();
	for(int i=0;i+1<g.size();i+=2) print(g[i],g[i+1],u),pp-=2;
	t[u]=0;
	if(pp) t[u]=g[g.size()-1];
}
void solve(int q)
{
	dep[q]=0;
	dfs1(q,0);
}
signed main()
{
	freopen("travel.in","r",stdin);
    freopen("travel.out","w",stdout);
	ios::sync_with_stdio(false);
	cin.tie(0),cout.tie(0);
	cin>>n>>m>>k;
	for(int i=1;i<=m;i++)
	{
		int u,v;
		cin>>u>>v;
		G[u].push_back(v);G[v].push_back(u);
		//e[u].push_back(v);e[v].push_back(u);
	}
	for(int i=1;i<=k;i++)
	{
		int x;
		cin>>x;
		id[i]=x;
		p[x]=1;
	}
	for(int i=1;i<=n;i++)
	{
		if(vis[i]) continue;
		dfs(i,0);/*
		for(int u=1;u<=n;u++)
		{
			cout<<u<<' ';
			for(int x:e[u]) cout<<x<<' ';
			cout<<'\n';
		}*/
		solve(i);
		for(auto v:guan) e[v].clear(); 
		guan.clear();
	}
	cout<<res<<'\n';
	for(int i=1;i<=res;i++)
	{
		for(int x:ans[i]) cout<<x<<" ";
		cout<<'\n';
	}
	return 0;
}
